package com.shinbada.modules.competitor.mapper;

import com.shinbada.modules.competitor.entity.VO.CompetitorProductDataItemVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import com.shinbada.core.persistence.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import com.shinbada.modules.competitor.entity.CompetitorProductDataItem;

import java.util.List;

/**
 * 产品数据项MAPPER接口
 * @author initcap
 * @version 2021-08-04
 */
@Mapper
@Repository
public interface CompetitorProductDataItemMapper extends BaseMapper<CompetitorProductDataItem> {
    /**
     * 根据数据项类型 获取数据项
     * @param type
     * @return
     */
    List<CompetitorProductDataItem> selectDataItemByType(String type);

    /**
     * 获取数据项树结构
     * @param dataItemType
     * @return
     */
    List<CompetitorProductDataItemVO> getTreeStructure(@Param("dataItemType") String dataItemType,@Param("parameterType") String parameterType);

    /**
     * 获取不在该数组总得数据项
     * @param array
     * @param dataItemType
     * @param parameterType
     * @return
     */
    List<CompetitorProductDataItemVO> getDisaffinityDataItem(@Param("array") String[] array,@Param("dataItemType") String dataItemType, @Param("parameterType") String parameterType);
}
